Unnecessary type Cast (UC)

Description:

UC detects if the type cast operator can be safely removed. This message is issued in cases where the compiler will automatically generate type conversion, such as a conversion from a type to that same type that is permitted for any type.

Incorrect:

void extend(int size) {
    int i = (int) size;
    ...
}

Correct:

void extend(int size) {
    int i = size;
    ...
}